package GUI;

import javax.swing.*;

public class MessageText extends JScrollPane {
	
	private static final long serialVersionUID = 1282900495888958217L;

	JTextArea message;
	
	public MessageText(JTextArea message) {
		super(message);
		this.message = message;
		message.setEditable(false);
		setBorder(BorderFactory.createTitledBorder("Message Window"));
	}
	
	public void AddMessage(String s) {
		String text = message.getText();
		text += s + "\n";
		message.setText(text);
	}
}
